package com.baor.vip.service.impl;

import com.baor.vip.domain.RechargeVO;
import com.baor.vip.domain.RefundVO;
import com.baor.vip.mapper.RefundMapper;
import com.baor.vip.service.RefundService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static com.baor.common.utils.PageUtils.startPage;

@Service
public class RefundServiceImpl implements RefundService {
    @Autowired
    private RefundMapper refundMapper;
    @Override
    public Map<String, Object> redundList(RefundVO refundVO) {
        List<String> selectTotal = refundMapper.selectTotal();
        startPage();
        List<RefundVO> refundList = refundMapper.refundList();
        PageInfo<RefundVO> pageInfo = new PageInfo<>(refundList);
        Map<String,Object> map = new HashMap<>();
        map.put("selectTotal",selectTotal);
        map.put("refundList",pageInfo);
        return map;
    }
}
